package singleton.example;

/**
 * 单例模式测试类
 * @author yaojianfeng
 */
public class Test {
    /**
     *创建多个实例
     * @param args
     */
    public static void main(String[] args) {
        ChocolateBoiler chocolateBoiler = ChocolateBoiler.getInstance();
        chocolateBoiler.fill();
        chocolateBoiler.boil();
        chocolateBoiler.drain();

        System.out.println("==============================");
        chocolateBoiler.fill();
        chocolateBoiler.drain();

    }
}
